package com.hunt.app.controller;


import com.hunt.model.app.StockHolder;
import com.hunt.service.app.StockHolderService;
import com.hunt.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: ww 股东查询
 * @Date : 2020/10/19
 */

@Api(value = "/app端股东信息查询")
@Controller
@RequestMapping(path = "/app/stockHolder")
public class StockHolderController {

    private static final Logger log = LoggerFactory.getLogger(StockHolderController.class);

    @Autowired
    private StockHolderService stockHolderService;

    @ApiOperation(value = "根据股票代码查询股东信息", httpMethod = "GET", produces = "application/json", response = Result.class)
    @ResponseBody
    @RequestMapping(value = "findStockHolderByStockCode", method = RequestMethod.GET)
    public Result findStockHolderByStockCode(@RequestParam(value = "stockCode") String stockCode) {
        StockHolder stockHolder = stockHolderService.findStockHolderByStockCode(stockCode);
        return Result.success(stockHolder);
    }
}
